package cn.besbing.server.service.primary;

import cn.besbing.model.entities.primary.Component;
import cn.besbing.model.entities.primary.ComponentKey;
import cn.besbing.model.mapper.primary.ComponentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrimaryComponentServiceImpl {

    @Autowired(required = false)
    private ComponentMapper componentMapper;

    public Component selectComponentByPrimary(ComponentKey primarykey){
        return componentMapper.selectByPrimaryKey(primarykey);
    }

    public List<Component> selectByTS(ComponentKey component){
        return componentMapper.selectByTS(component.getAnalysis(),component.getVersion());
    }

}
